package com.egreen.system.utils;

/**
 * @author cloudJiang
 * @date 2022/6/24 9:23
 */
public enum States {
    OK(20000, "成功"),
    ERR_BAD_REQUEST(40000, "请求参数错误"),
    ERR_UNIQUE(40100, "该值已存在"),
    ERR_USER_NOT_FOUND(40101, "该值不存在"),
    ERR_JWT_EXPIRED(40900, "登录过期"),
    ERR_JWT_MALFORMED(40901, "数据无效"),
    ERR_JWT_SIGNATURE(40902, "签名错误"),
    ERR_INSERT(50000, "插入数据错误"),
    ERR_UPDATE(50001, "更新数据错误"),
    ERR_SELECT(50002, "查询数据失败"),
    ERR_DELETE(50003, "删除数据失败"),
    ERR_SQL(50004, "数据库异常"),
    ERR_INTERNAL_SERVER_ERROR(50100, "服务器错误"),
    ERR_UNKNOWN(51000, "服务器忙，请稍后再试"),
    ERR_POINT_ACCOUNT(52000, ""),
    ERR_POINT_UPDATE(52100, "商品过于火爆，请稍后再试");

    private int states;
    private String description;

    public String getDescription() {
        return description;
    }

    public int getStates() {
        return states;
    }

    States(int states, String description) {
        this.states = states;
        this.description = description;
    }
}
